/*******************************************************************************
 *
 *    Copyright (c) BaiNa Co. Ltd
 *
 *    MoboTap Client
 *
 *
 *    @author: DanLiu
 *    @since:  2009-12-25
 *    @version: 1.0
 *
 ******************************************************************************/

package com.sdk.widget;

import android.content.Context;
import android.text.TextUtils.TruncateAt;
import android.util.AttributeSet;
import android.widget.TextView;

/**
 * 
 */
public class AlwaysMarqueeTextView extends TextView{


    public AlwaysMarqueeTextView(final Context context) {
        super(context);
        init();
    }

    public AlwaysMarqueeTextView(final Context context, final AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public AlwaysMarqueeTextView(final Context context, final AttributeSet attrs, final int defStyle) {
        super(context, attrs, defStyle);
        init();
    }

    private void init(){
        setSingleLine(true);
        setEllipsize(TruncateAt.MARQUEE);
        setMarqueeRepeatLimit(-1);
    }

    @Override
    public boolean isFocused() {
        return true;
    }
}
